package com.meiyue.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.DriverManagerDataSource;

//@Configuration
public class DataBaseConfig {  
    @Bean
    public DriverManagerDataSource dataSource(){
        DriverManagerDataSource driverManagerDataSource=new DriverManagerDataSource();  
        driverManagerDataSource.setDriverClassName("com.mysql.jdbc.Driver");  
        driverManagerDataSource.setUrl("jdbc:mysql://192.168.2.19:3306/test");
        driverManagerDataSource.setUsername("root");  
        driverManagerDataSource.setPassword("root");
        return driverManagerDataSource;
    }  
}  